From 6b0857cb377ff570ed4b07bd4338102a4b6e7025 Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Mon, 19 Aug 2013 19:56:58 +0200 Subject: [PATCH] (imagemagick_get_animation_cache): Fix memory leak. --- src/ChangeLog | 3 +++ src/image.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 79c00475ee6..d5dae2544cc 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -2,6 +2,9 @@ * image.c (imagemagick_get_animation_cache): Don't segfault on each invocation. + (imagemagick_get_animation_cache): Revert to previous definition + so that it actually works. But keep the memory leak fix. + (imagemagick_get_animation_cache): Fix memory leak. 2013-08-19 Paul Eggert diff --git a/src/image.c b/src/image.c index 2b415fb9b97..7a6323ad332 100644 --- a/src/image.c +++ b/src/image.c @@ -7945,10 +7945,10 @@ imagemagick_get_animation_cache (MagickWand *wand) if (strcmp (signature, cache->signature)) { cache->next = imagemagick_create_cache (signature); - DestroyString (signature); return cache->next; } + DestroyString (signature); cache->update_time = current_emacs_time (); return cache; } -- 2.30.2